package com.gexiaobao.pigeon.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.gexiaobao.pigeon.R
import com.gexiaobao.pigeon.app.model.bean.RaceTypeResponse

/**
 * @author:hxw
 * @date  :2023/2/2
 * @desc  :
 */
class ProjectListAdapter(data: ArrayList<RaceTypeResponse.RaceTypeListBean>) :
    BaseQuickAdapter<RaceTypeResponse.RaceTypeListBean, BaseViewHolder>(R.layout.item_race_pick, data) {

    override fun convert(holder: BaseViewHolder, item: RaceTypeResponse.RaceTypeListBean) {
        holder.setText(R.id.tv_item_Level, item.baseName)
        var itemType = ""
        when (item.baseStatus) {
            1 -> {
                itemType = context.getString(R.string.item_train_fly_main_list_not_start)//"未开始"
            }
            2 -> {
                itemType = context.getString(R.string.underway)//"进行中"
            }
            3 -> {
                itemType = context.getString(R.string.finished)//"已结束"
            }
        }
        holder.setText(R.id.tv_item_type, itemType)
    }
}